package com.clayecloud.module_property_payment.entity;

import android.widget.TextView;

import androidx.databinding.BaseObservable;
import androidx.databinding.Bindable;
import androidx.databinding.BindingAdapter;

import java.math.BigDecimal;
import java.util.Date;

public class HouseOrder extends BaseObservable {

    /**
     * 订单id
     */
    private Integer orderId;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 房屋id
     */
    private Integer houseId;

    /**
     * 订单类型
     */
    private Integer orderType;

    /**
     * 订单描述
     */
    private String orderDescribe;

    /**
     * 订单金额
     */
    private BigDecimal orderCost;

    /**
     * 订单状态
     */
    private Integer orderState;

    /**
     * 创建时间
     */
    private String creatTime;

    /**
     * 更新时间
     */
    private String updateTime;

    @Bindable
    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    @Bindable
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Bindable
    public Integer getHouseId() {
        return houseId;
    }

    public void setHouseId(Integer houseId) {
        this.houseId = houseId;
    }

    @Bindable
    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    @Bindable
    public String getOrderDescribe() {
        return orderDescribe;
    }

    public void setOrderDescribe(String orderDescribe) {
        this.orderDescribe = orderDescribe;
    }

    @Bindable
    public BigDecimal getOrderCost() {
        return orderCost;
    }

    public void setOrderCost(BigDecimal orderCost) {
        this.orderCost = orderCost;
    }

    @Bindable
    public Integer getOrderState() {
        return orderState;
    }

    public void setOrderState(Integer orderState) {
        this.orderState = orderState;
    }

    @Bindable
    public String getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(String creatTime) {
        this.creatTime = creatTime;
    }

    @Bindable
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }


    @BindingAdapter("ordertitleCostHandle")
    public static void ordertitleCostHandle(TextView textView, String cost){
        textView.setText("￥"+cost);
    }

    @BindingAdapter("orderCostHandle")
    public static void orderCostHandle(TextView textView, String cost){
        textView.setText(cost+"元");
    }
}
